<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
	<title>switch</title>
	<style type="text/css">
	* {
		padding: 0;
		margin: 0;
	}
    </style>
</head>
<body>
	<div class="container">
		<h1>switch</h1>
		<input type="text" name="password">
		<input type="text" name="confirm_password">
		<div id="errorTips"></div>
	</div>

<script type="text/javascript"> 
var a = '1'
switch (a) {
  case '1':
    console.log('字符串1');
    break;
  case 2:
    console.log(2);
   case 1:
   console.log('数字1', typeof a);
  default:
    console.log("default");
}




</script>
</body>
</html>